package com.cicc.beergamevirtualsimulationsystem.model.userType;

import com.cicc.beergamevirtualsimulationsystem.annotation.EnumValid;
import com.cicc.beergamevirtualsimulationsystem.common.constant.RoleTypeConstant;
import com.cicc.beergamevirtualsimulationsystem.common.enums.userTypeEnum.RoleType;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

/**
 * 角色类型
 */
@Data
public class RoleTypeReq {

    /**
     * 角色类型 1=工厂 2=供应商 3=零售商
     */
    @EnumValid(enumClass = RoleType.class, message = RoleTypeConstant.ROLE_TYPE_ERROR)
    private Integer roleType;
    /**
     * 角色名
     */
    @NotBlank(message = RoleTypeConstant.ROLE_NAME_BLANK_ERROR)
    private String roleName;
    /**
     * 角色人数
     */
    @Min(value = 0, message = RoleTypeConstant.ROLE_NUM_ERROR)
    private Integer roleNum;
    /**
     * 进价
     */
    @Min(value = 0, message = RoleTypeConstant.PURCHASE_PRICE_ERROR)
    private Integer purchasePrice;

    /**
     * 售价
     */
    @Min(value = 0, message = RoleTypeConstant.SELLING_PRICE_ERROR)
    private Integer sellingPrice;
    /**
     * 期初库存
     */
    @Min(value = 0, message = RoleTypeConstant.OPENING_INVENTORY_ERROR)
    private Integer openingInventory;

    /**
     * 库存单价
     */
    @Min(value = 0, message = RoleTypeConstant.INVENTORY_UNIT_PRICE_ERROR)
    private Integer inventoryUnitPrice;

    /**
     * 延期交付单价
     */
    @Min(value = 0, message = RoleTypeConstant.DELAYED_DELIVERY_UNIT_PRICE_ERROR)
    private Integer delayedDeliveryUnitPrice;

}
